	<!-- BEGIN header -->
	<include file="public:header" />
	<!-- END header -->

	<!-- BEGIN CONTAINER -->

	<div class="page-container row-fluid">
		{$left_menu}
		<!-- BEGIN PAGE -->

		<div class="page-content">

			

			<!-- BEGIN PAGE CONTAINER-->        

			<div class="container-fluid">

				<!-- BEGIN PAGE HEADER-->

				<div class="row-fluid">

					<div class="span12">

						<!-- BEGIN STYLE CUSTOMIZER -->

						<!-- END BEGIN STYLE CUSTOMIZER -->  

						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<include file="public:breadcrumb" />
						<!-- END PAGE TITLE & BREADCRUMB-->
						
						<!-- BEGIN sub_menu -->
						<include file="public:sub_menu" />
						<!-- END sub_menu -->

					</div>

				</div>

				<!-- END PAGE HEADER-->

				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">

					<div class="span12">

						<!-- BEGIN VALIDATION STATES-->

						<div class="portlet box blue">

							<div class="portlet-title">

								<div class="caption"><i class="icon-reorder"></i>分类信息</div>

								<div class="tools">

									<a href="javascript:;" class="collapse"></a>

								</div>

							</div>

							<div class="portlet-body form">

								<!-- BEGIN FORM-->

								<form action="" method="post" id="form_sample_1" class="form-horizontal" novalidate="novalidate">
									<egt name="Think.get.pid" value="1">
									<div class="control-group">

										<label class="control-label">所属大类</label>

										<div class="controls">

											<select class="span6 m-wrap" name="pid">
												
												<volist name="spid" id="v">
													<option value="{$v.id}" <eq name="pid" value="$v['id']">selected</eq>  >{$v.name}</option>
												</volist>

											</select>

										</div>

									</div>
									</egt>
									
									<div class="control-group">

										<label class="control-label">分类名称</label>

										<div class="controls">

											<input name="name" class="span6 m-wrap" type="text" value="{$info.name}">

										</div>

									</div>
									
									<div class="control-group" style="display:none">
									
									  <label class="control-label">分类图片</label>
									  <div class="controls attachment_icon">
										  <input type="text" name="img" value="{$info.img}">
										  <img src="<if condition="$info.img eq ''">./media/image/animated-overlay.gif</if><if condition="$info.img neq ''">{$info.img}</if>" class="img-thumbnail brandico kindeditor">
										  <div class="attachment_tip">
											<img src="">
										  </div>
									  </div>
										<style>
										.kindeditor {
											width: 50px;
											height: 50px;
										}
										.attachment_icon {
											margin-left: 8px;
											position: relative;
										}
										.attachment_tip {
											display: none;
											left: 16px;
											padding: 1px;
											position: absolute;
											top: 16px;
											z-index: 9;
										}
										</style>
										<link rel="stylesheet" href="./edit/themes/default/default.css" />
										<script charset="utf-8" src="./edit/kindeditor-min.js"></script>
										<script charset="utf-8" src="./edit/lang/zh_CN.js"></script>
									</div>
									

									
									<div class="control-group">

										<label class="control-label">排序</label>

										<div class="controls">

											<input name="ordid" class="span6 m-wrap" type="text"  value="{$info.ordid}">

										</div>

									</div>
									
									<div class="control-group">

										<label class="control-label">是否启用</label>

										<div class="controls">

											<label class="radio">

											<input name="status" value="1" type="radio" <if condition="($info.status eq 1) OR (ACTION_NAME eq 'add')"> checked="checked"</if>>

											启用

											</label>

											<label class="radio">

											<input name="status" value="0" type="radio" <if condition="($info.status eq 0) and (ACTION_NAME eq 'edit')"> checked="checked"</if>>

											不启用

											</label>

										</div>

									</div>


									<input type="hidden" name="ategory" value="{:checkAtegory()}">
									<input type="hidden" name="id" value="{$info.id}" />

									<div class="form-actions">

										<button type="submit" class="btn blue">
											<if condition="(ACTION_NAME eq 'add')">添加</if>
											<if condition="(ACTION_NAME eq 'edit')">编辑</if>
										</button>

										<a href="javascript:history.go(-1)" type="button" class="btn">取消</a>

									</div>

								</form>

								<!-- END FORM-->

							</div>

						</div>

						<!-- END VALIDATION STATES-->

					</div>

				</div>
				

				

				<!-- END PAGE CONTENT-->

			</div>

			<!-- END PAGE CONTAINER-->

		</div>

		<!-- END PAGE -->

	</div>

	<!-- END CONTAINER -->
	
	<!-- BEGIN FOOTER -->
	<include file="public:footer" />
	<!-- END FOOTER -->
	<script>
	KindEditor.ready(function(K) {
			var editor = K.editor({
					allowFileManager : true
			});
			$('.kindeditor').click(function() {
				var obj = $(this);
					editor.loadPlugin('image', function() {
							editor.plugin.imageDialog({
									imageUrl : obj.prev().val(),
									clickFn : function(url, title, width, height, border, align) {
											obj.prev().val(url);
											obj.attr("src",url);
											editor.hideDialog();
									}
							});
					});
			});
	});
	$(function(){
		$('.kindeditor').mouseover(function(){
			var img = $(this).prev().val();
			$('.attachment_tip img').attr('src',img);
			$('.attachment_tip').show();
			
		});
		$('.attachment_tip').click(function(){
			$(this).hide();
			
		});
	});	
    </script>
</html>